Integration Guide Yaskawa BPS 1.12

This is the integration guide for Yaskawa robots with Bin Picking Studio (BPS) version 1.12 (Robot module version 1.12.1).

Prerequisites

  • Robot controller DX200, YRC1000 or YRC1000micro. For DX100 and FS100, contact the Help Center. NX100 and YRC Next (YNX) are not supported.

  • System software YBS 1.34 or newer (the most recent version is best).

  • MotoPlus option enabled.

  • Robot module files from the yaskawa/BPS package: MotoPlus Binary/<controller>/PhotoneoModule_BPS_1.12.1.out, INFORM/<controller>/*.JBI and INFORM/<controller>/VARNAME.DAT.

See also Robot communication overview and Robot module support matrix.

1. Robot Controller Setup

1.1 IP Configuration

Start the robot controller in Maintenance Mode. To do this, hold the Main Menu button while you turn on the main switch. You hear a short beep during the boot. The figure below shows the Maintenance Mode screen:

Figure 1

Change the security level from Editing to Management Mode. Go to System → Security.

Figure 2

Select Management Mode from the list:

Figure 3

The password for Management Mode is 9999 9999 9999 9999 (16 x 9, without spaces):

Figure 4

Note

The three keys in the top status bar show that Management Mode is active.

To configure the IP address of the robot controller, go to System → Setup → Option Functions and select LAN Interface Setting. This opens the network configuration pane:

Figure 5

Select Manual Setting for the LAN2 port and change the IP address to match your network:

Figure 6

Note

We recommend that you connect the Ethernet cable to the LAN2 port.

Note

The subnet mask 255.255.255.0 is the same as a 24-bit subnet mask. See this table for more combinations: https://dnsmadeeasy.com/support/subnet

Example of a matching network configuration on the vision controller side:

  • Vision controller IPv4 address: 192.168.1.1 / 24

  • Robot controller IPv4 address: 192.168.1.2 / 24 (as configured in the previous step)

Figure 7

1.2 Enabling MotoPlus Functionality

If MotoPlus is not enabled on the robot controller yet, go to System → Setup → Option Functions.

Change the MOTOPLUS Func state from NOT USED to USED.

Figure 8

The MotoPlus APL icon is now visible in the left pane.

Open the MotoPlus Func. Settings:

Figure 9

Enable the MotoPlus Autostart option:

Figure 10

1.3 Loading the MotoPlus Binary (.out)

The Photoneo Yaskawa interface consists of:

  • MotoPlus binary - PhotoneoModule_BPS_1.12.1.out

  • INFORM files - request INFORM jobs + INFORM job templates + VARNAME.DAT

Use the .out file from the folder in MotoPlus Binary (DX200, YRC1000, YRC1000u) that matches your robot controller type. Use the INFORM files from the folder with the same name in INFORM. Copy the file to the root directory of a USB flash drive.

To load the MotoPlus binary, do these steps:

Select MOTOPLUS Apl. → Load (User Application).

Figure 11

Select the PhotoneoModule_BPS_1.12.1.out file and confirm Load.

Note

You can load only one Photoneo .out binary at a time. Check the File List to make sure that no other Photoneo MotoPlus binary is loaded.

Figure 12

The Maintenance Mode part of the configuration is now complete.

Restart the robot controller in Normal Mode.

Note

After the restart in normal mode, you can see the error message below. This is expected. You remove this error when you configure the user coordinate frame in section 1.7. Reset the error and continue with the steps below.

Figure 13

1.4 Loading the INFORM Jobs

Copy all INFORM jobs to the root directory of the USB flash drive. Go to Ex. Memory → Load and use Edit → Select All to select all jobs from the INFORM folder, as shown in the figure below:

Figure 14

Press Enter to start the transfer:

Figure 15

All job files are now available in the robot controller.

1.5 Loading VARNAME.dat

The VARNAME.dat system file comes with the INFORM jobs. It contains the names of the variables that the Robot module uses. When you load this file, it erases all existing variable names and adds the Photoneo names.

Copy VARNAME.dat to the root directory of the USB drive. Go to Ex. Memory → Load.

Figure 16

Select System Data.

Figure 17

Select the VARIABLE NAME → VARNAME.DAT file from the list, press Enter and confirm the load.

Figure 18

After this operation, all variable comments are erased and the Photoneo variable names are added (BYTE, INTEGER, POSITION).

Figure 19

1.6 Setting the Vision Controller IP Address on the Robot Side

Next, tell the Yaskawa robot controller the IP address of the vision controller, as configured on the BPS Network page. The first 4 integer variables are used for this:

Figure 20

The IP address in the first 4 integer variables must match the vision controller IP address on the BPS Network page:

Figure 21

To check that the robot controller is physically connected to the vision controller and that the network is configured correctly, use the Ping function in System Info → Network Utility:

Figure 22

Type the IP address of the vision controller in the Host field and press the Execute button:

Figure 23

If the connection works, Ping returns an “OK” message for all 4 attempts. You can also use the Test Connection button on the Network page of the vision controller to ping the Yaskawa robot from the vision controller.

Figure 24

The result of Test Connection (ping command) is Robot Available or Robot Unavailable.

Figure 25
Figure 26

If the robot is unavailable, check the cables and the network settings on both sides, and try again. Make sure that the Ethernet cables are connected to the correct ports. If you use a switch, make sure that it does not block the connection.

1.7 USER COORDINATE Setup

The BPS world origin is at the intersection of J1 and the bottom of the robot base (see the image below). The Yaskawa World/Base origin is above this point, at the intersection of J1 and the J2 axis plane (see the image below). For the bin picking system and calibration to work correctly, you must compensate the distance between these two origins on the Yaskawa side.

Figure 27

To do this, define USER COORDINATE 1 with a negative Z offset.

To select the user frame, press Robot → User Coordinate.

Figure 28

Select the first frame and press Display → Coordinate Data to open it.

Figure 29

Set the Z coordinate value from the Base Frame Offset Table below. This manual uses a Yaskawa GP8, so the Z offset is -330mm.

Figure 30

This configuration moves the Yaskawa world origin down to match the Photoneo world origin.

Base Frame Offset Table for the currently available Yaskawa robot models:

Robot model

Z offset [mm]

Robot model

Z offset [mm]

GP12

-450

HC10DT-A

-275

GP180

-650

HC10DT-B

-275

GP180-120

-650

HC20DTP

-380

GP20

-505

MA2010

-505

GP25

-505

MH12

-450

GP25-12

-505

MH24-10

-505

GP35L

-540

MH24

-505

GP4

-330

MH3BM

-350

GP50

-540

MH3F

-290

GP7

-330

MH50-35

-540

GP70L

-540

MH50II-K00

-540

GP8

-330

MH5LSII

-330

GP88

-540

MH5SII

-330

HC10

-275

MotoMINI

-171

SP180H

-650

Note

If you use a custom robot from Photoneo support and its Z offset is not in the table, check the original robot documentation for the Z value. You can usually see this value in the drawing of the robot working envelope.

1.8 TOOL Frame

TOOL frame - BPS reads the Yaskawa flange pose during calibration and during hand-eye scan requests. By default, TOOL 63 (the last one) is used. The module expects it to be all zeros, which is ideal for Photoneo. If Tool 63 is zero, you do not need to change anything on the TOOL side for calibration.

Figure 31

Note

Tools are visible only if Setup → Teaching Conditions → Tool No Switch is set to Permit.

Figure 32

1.9 Robot State Server and Robot Pose Visualization

The Robot State Server is a MotoPlus background routine. It lets BPS read the current joint positions and the Cartesian tool position of the Yaskawa robot. BPS uses the joint positions to show the robot. The Cartesian TCP data is necessary for calibration and for all hand-eye scan requests. The server sends data to the vision controller at 30Hz on port 11004 (default).

  • The vision controller connects to the robot on port 11004. The robot first sends its brand ID. Then it repeats two messages 30 times per second: the joint positions (radians) and the TCP pose of Tool 63 in User Coordinate 1.

  • The Action Request Client connection (requests from INFORM jobs) is a separate connection from the robot to the vision controller on port 11003.

If the MotoPlus binary is loaded correctly and User Coordinate Frame 1 is set as described in chapter 1.7, the Robot State Server starts automatically when the robot boots. If the joint or TCP position cannot be read (for example, User Coordinate 1 is not defined), the module raises alarms 8034-8037. The Robot State Server then stops sending data until the next connection.

The Robot State Server is useful for first configuration checks. For example, you can show the current robot and gripper state on the Environment Page with the Robot Module Motion Mode, as shown below.

Figure 33

When the Robot State Client is connected, the robot streams the current joint and tool data to BPS at 30 Hz. The robot pose visualization on the Environment Page and calibration now work.

To check visually that the robot reports the correct tool pose, start calibration and switch from the Texture tab to the Verification tab. In the Axis menu, enable Tool Pose (robot controller). The frame marker must be in the center of the flange, with the Z axis pointing down. It must be the same as the Tool0 (robot model) frame.

Figure 34

2. Robot Module

Note

We strongly recommend that you read the Robot communication overview and Action requests before this section.

2.1 Connection Procedures

These 2 procedures connect the MotoPlus binary to the vision controller and disconnect it.

INFORM job

Description

PHO_CONNECT_TO_VC

INFORM job that tells the MotoPlus binary to connect to the vision controller

PHO_RECOVER

INFORM job that tells the MotoPlus binary to disconnect correctly from the vision controller. If the disconnect happens while a trajectory is being received, MotoPlus first reads all remaining data from the vision controller and then disconnects.

2.2 Request List

This section describes the requests that the Robot module supports. Use these procedures to control BPS from an INFORM program. Every request job writes the request ID to I004 and sets B002. Then it waits for B003 (except PHO_SCAN_REQUEST and PHO_TRAJ_REQUEST). Action requests describes the meaning of each request.

INFORM job

Function

Request ID

Input

Populates

PHO_BIN_LOCATOR

Bin localization request

3

I005

I007

PHO_CALIB_ADD_POINT

Add calibration point request (the robot pose comes from the Robot State Server)

5

None

I007

PHO_CALIB_SAVE

Save calibration request at the end of calibration. The job sets I031 = 0 and I032 = 1 itself.

27

None

I007, I033, P009

PHO_CALIB_START

Start calibration request

25

I005, I006

I007

PHO_CALIB_STOP

Stop calibration request

26

None

I007

PHO_CHANGE_ENVI

Change environment request

15

I014

I007

PHO_CHANGE_BBOX

Change bounding box request

32

I005, I036

I007

PHO_CHANGE_SOLUTION

Change solution request

9

I006

I007

PHO_INITIALIZE_VS

Initialize vision system request. Sends the Start pose and End pose from the P variables whose numbers are in I008 and I009.

4

I005, I008, I009

I007

PHO_PICK_FAILED_REQUEST

Request to report a failed pick to the vision system

7

I005

I007

PHO_CAPTURE_REQUEST

Capture scan request for meshing. It does not start localization. Sends the current TCP pose and waits for the response (B003).

28

I005, B009, I035*

I007, B010

PHO_GET_STATUS_REQUEST

Get vision system status: number of localized objects, number of pickable objects, running/finished

21

I005

I007, I016, I017, I018

PHO_GET_OBJECT_POSE

Request the Cartesian pose of the object from the vision system instead of a joint trajectory

8

I005, I031, I032

I007, P008

PHO_REUSE_SCAN_REQUEST

Reuse the last captured scan for localization on a different vision system

29

I005

I007

PHO_GET_RUNNING_SOLUTION

Get the currently running solution

12

None

I007, I034

PHO_SCAN_REQUEST

Regular scan request. Starts localization. Does not wait for the response.

1

I005

None (use PHO_WAIT_FOR_SCAN)

PHO_START_SOLUTION

Start solution request

10

I006

I007

PHO_STOP_SOLUTION

Stop solution request

11

None

I007

PHO_TRAJ_REQUEST

Trajectory request. Does not wait for the response.

2

I005

None (use PHO_TRAJ_RECEIVE)

PHO_TRAJ_RECEIVE

Counterpart of the trajectory request. MotoPlus keeps the trajectory and copies it to P010-P109 segment by segment during PHO_PICK_OBJECT.

-

None

I007, B004, I021-I026

PHO_WAIT_FOR_SCAN

Counterpart of the scan request (and of the last capture request in dynamic meshing)

-

None

I007

PHO_COM_CHECK

Request to check the connection

100

None

I007

I005 vision system ID, I006 solution ID, I007 error data, I014 environment ID, I016 number of localized objects, I017 number of pickable objects, I018 vision system running/finished, I021-I026 Info data of the current pick, I031 tool ID, I032 user coordinate ID, I033 calibration accuracy, I034 running solution ID, I035 *capture gap (used only in dynamic meshing), I036 bounding box ID, B009 dynamic meshing on/off, P009 calibration result pose, P008 Cartesian object pose, P010-P109 joint trajectory waypoints

2.3 INFORM Bin Picking Procedures

These procedures run the actual pick. The gripper jobs are empty by default. Fill them with the IO commands that control your gripper.

PHO_EXE_TRAJ_CNT/FINE contains the MOVJ motion segments for every possible trajectory size from 1 to 100 waypoints. DO NOT EDIT!

PHO_PICK_OBJECT is the main bin picking procedure. It controls the whole picking sequence. DO NOT EDIT!

INFORM job

Function

PHO_PICK_OBJECT

Main bin picking procedure. DO NOT EDIT!

PHO_EXE_TRAJ_CNT

INFORM job that executes the joint waypoint trajectory. It is a long job because it has an IF THEN segment for each possible trajectory size from 1 to 100. The last waypoint of PHO_EXE_TRAJ_CNT has a NWAIT argument. Because of this, the exact time when gripper commands run after PHO_EXE_TRAJ_CNT is not guaranteed.

PHO_EXE_TRAJ_FINE

INFORM job that executes the joint waypoint trajectory. It is a long job because it has an IF THEN segment for each possible trajectory size from 1 to 100. The last waypoint of PHO_EXE_TRAJ_FINE does not have a NWAIT argument, so gripper commands run after the robot reaches the position.

PHO_GRIPPER_ACTION

Internal procedure that forwards the gripper command to the correct INFORM job

PHO_GRIPPER_ATTACH

User-defined procedure, empty by default. Fill it with the commands that make the gripper attach the object. PHO_PICK_OBJECT calls this procedure automatically if the current grasping method is configured to use it.

PHO_GRIPPER_DETACH

User-defined procedure, empty by default. Fill it with the commands that make the gripper detach the object. PHO_PICK_OBJECT calls this procedure automatically if the current grasping method is configured to use it.

PHO_GRIPPER_USER_1

User-defined procedure, empty by default. Use it for custom operations during the picking trajectory. PHO_PICK_OBJECT calls this procedure automatically if the current grasping method is configured to use it.

PHO_GRIPPER_USER_2

User-defined procedure, empty by default. Use it for custom operations during the picking trajectory. PHO_PICK_OBJECT calls this procedure automatically if the current grasping method is configured to use it.

PHO_GRIPPER_USER_3

User-defined procedure, empty by default. Use it for custom operations during the picking trajectory. PHO_PICK_OBJECT calls this procedure automatically if the current grasping method is configured to use it.

2.4 INFORM Example List

The BPS 1.12 module includes several INFORM example programs. They show how to use the requests from section 2.2 in different use cases:

INFORM example

Description

PHO_MAIN_CALIBRATION PHO_MAIN_CALIBRATION_HAND_EYE

Template for the calibration procedure. The user must start and confirm the first calibration of a vision system manually in BPS. The calibration procedure needs the USER COORDINATE configuration from chapter 1.7. Teach all 9 poses that calibration needs. If PHO_CONNECT_TO_VC connects to the vision controller, each PHO_CALIB_ADD_POINT request sends the current robot pose to the vision controller. If there is no connection, you can add the robot poses manually on the vision side. Type the values of the current robot pose from the teach pendant. As a rule of thumb, the calibration error must be below 3mm. If it is higher, there is usually a systematic error (for example, the robot does not report the correct pose, or the calibration ball moved between poses). If the calibration error is below 3mm, save the calibration on the vision controller side and quit calibration.

PHO_MAIN_AUTO_RECALIBRATION

After the first calibration is successful and automatic recalibration is allowed in the vision system settings, you can run automatic recalibration from the robot. You do not need to touch the vision system. The calibration object must stay where it was during the first calibration. The calibration ball stays mounted in the same place on the flange or gripper and moves with the robot. The marker pattern stays in the same place in the cell. Sequence: PHO_CONNECT_TO_VC, PHO_STOP_SOLUTION (calibration cannot start while a solution is running), set I006 / I005, PHO_CALIB_START, 9 x (MOVJ + PHO_CALIB_ADD_POINT), PHO_CALIB_SAVE, PHO_CALIB_STOP. After PHO_CALIB_SAVE, I033 holds the calibration accuracy (µm) and P009 holds the calibration pose. Check I007 after each request.

PHO_MAIN_BASIC

Very basic example for a statically mounted scanner. It shows how to initialize a system, send a scan request, request a trajectory, receive the trajectory as joint waypoints and execute the paths. The example also shows error handling: PHO_SCAN_REQUEST and PHO_TRAJ_REQUEST return the error value in I007 - PHO_ERROR_DATA. Before you run this INFORM job, set the Start and End positions manually (Chapter 3.1) and fill in the empty gripper commands (Chapter 3.2).

PHO_MAIN_BASIC_HAND_EYE

Same as PHO_MAIN_BASIC, but for a hand-eye mounted scanner. The only difference is that the scanning pose is different from the static mount.

PHO_MAIN_MULTI_VS

Same as PHO_MAIN_BASIC, but switches between two vision systems. Integer variable I005 PHO_VS_ID is important here. Its value controls which vision system is triggered or asked for a trajectory. The first pick in the loop uses vision system 1 and the second pick uses vision system 2.

PHO_MAIN_CHANGE_ENVI

Same as PHO_MAIN_BASIC, but shows how to use the PHO_CHANGE_ENVI request. Integer variable I014 PHO_ENVI_ID is important here. It defines which environment state the next PHO_CHANGE_ENVI request activates.

PHO_MAIN_CHANGE_SOL

Same as PHO_MAIN_BASIC, but shows how to use all solution switching requests. Integer variable I006 PHO_SOL_ID is important here. It defines which solution the next PHO_START_SOLUTION or PHO_CHANGE_SOLUTION request activates.

PHO_MAIN_GET_OBJECT_POSE

Same as PHO_MAIN_BASIC, but the robot requests the Cartesian pose of the object instead of a trajectory. This is useful for pick checks, slip sheet detection and simple picking tasks. Note that the system returns the raw Cartesian pose from localization, with the origin defined in the object STL. No gripping points or invariances are applied. The result is stored in P008 - PHO_OBJECT_POSE. Before the request, set I031 to the tool number (0-63) and I032 to the user frame number (1 - the Photoneo world frame from chapter 1.7). Both are stored with P008. This example does not execute a trajectory. It is a simple move to a Cartesian target.

PHO_MAIN_GET_STATUS

Same as PHO_MAIN_BASIC, but shows how to use PHO_GET_STATUS_REQUEST to monitor the number of localized and ready-to-pick objects and the current state of the vision system (Running/Finished). You can send PHO_GET_STATUS_REQUEST repeatedly in short intervals during localization. The status request fills integer variables I016 PHO_NUM_OF_LOC, I017 PHO_NUM_OF_PLAN and I018 PHO_VS_CUR_STATE. These variables are often used for more advanced decisions about when to start the pick procedure.

PHO_MAIN_MESHING_STATIC

Example of how to stitch multiple scans before localization starts. This is useful for complex scenes or large objects. This example uses the static approach: the robot stops in each scanning position and triggers/captures a scan. The Robot State Server must be running with the correct user coordinate configuration, and B009 PHO_MESH_DYNAMIC must be set to 0. PHO_CAPTURE_REQUEST waits for its own response, so you do not need PHO_WAIT_FOR_SCAN after each capture. Check I007 instead. When capturing is complete, send a regular PHO_SCAN_REQUEST to start localization. This request does not trigger a real scan. It only starts the localization process. The total number of scans must be less than 10.

PHO_MAIN_MESHING_DYNAMIC

Similar to PHO_MAIN_MESHING_STATIC, but the capturing happens while the robot moves continuously. BPS combines Photoneo Instant Meshing technology with the Parallel Structured Light technique of MotionCam-3D. The Robot State Server must be running with the correct user coordinate configuration. Important flags and variables: B009 PHO_MESH_DYNAMIC, B010 PHO_MESH_STARTED, I035 PHO_CAPTURE_GAP. This example shows how to start a capturing procedure. MotionCam-3D triggers scans with the delay set in I035 PHO_CAPTURE_GAP while the robot moves through predefined waypoints. Set B009 - PHO_MESH_DYNAMIC to TRUE to activate dynamic meshing mode. Set I035 PHO_CAPTURE_GAP to approximately 100-500 ms to limit the scan rate, so that the system does not get too many scans. The robot position during the first scan defines the orientation of the final point cloud. Because of this, the Photoneo interface blocks robot motion until the MotoPlus binary sets B010 - PHO_MESH_STARTED to 1 after it receives the first scan. In the dynamic case, only the last PHO_CAPTURE_REQUEST is followed by a PHO_WAIT_FOR_SCAN request. At the end of capturing, send a regular PHO_SCAN_REQUEST to start localization. This scan does not flash any light. It only starts the localization process. The scanning trajectory must be smooth, without large rotations, and the scanned area must stay in the field of view all the time so that tracking is not lost. The total number of scans must be less than 60.

PHO_MAIN_REUSE_SCAN

Same as PHO_MAIN_MULTI_VS, but uses PHO_REUSE_SCAN_REQUEST instead of regular scan requests. This request is useful when the scene has not changed since the last scan, but you want to repeat localization with a different configuration (different objects, different bounding boxes or different settings). The scan for VS1 is a regular scan, and the scan for VS2 reuses the scan from VS1. Integer variable I005 PHO_VS_ID selects the vision system for reused scans in the same way as for regular vision system switching.

PHO_MAIN_CHANGE_BBOX

Same as PHO_MAIN_BASIC, but shows how to use the PHO_CHANGE_BBOX request. Integer variables I005 PHO_VS_ID and I036 PHO_BBOX_ID select the vision system and the target bounding box ID. The example switches between two bounding boxes in the picking loop.

2.5 BYTE Variables

This version of the BPS module uses these 11 byte variables (B000-B010):

BYTE variable

Description

Set by

B000 PHO_CONNECT_VC

The INFORM job sets this flag to tell the MotoPlus binary to connect to the vision controller.

user

B001 PHO_CONNECTED

The MotoPlus binary sets this flag after it connects to the Action Request Server in BPS. It resets the flag when the session ends.

system

B002 PHO_NEW_REQ

The request INFORM job sets this flag to tell the MotoPlus binary that the user started a new request. The MotoPlus binary resets this flag after it processes the request.

user

B003 PHO_REQ_FINISHED

The MotoPlus binary sets this flag to tell INFORM that the response to the last request has arrived. The INFORM side resets this flag immediately.

system

B004 PHO_PICK_ALLOWED

The MotoPlus binary sets this flag at the end of PHO_TRAJ_RECEIVE to tell INFORM that the trajectory data arrived correctly and the pick can start.

system

B005 PHO_OPER_READY

The MotoPlus binary sets this flag to tell INFORM that the next trajectory segment is ready to execute. Used only during PHO_PICK_OBJECT.

system

B006 PHO_OPER_FINISH

INFORM sets this flag during PHO_PICK_OBJECT to tell the MotoPlus binary that the trajectory segment is complete. The binary can then copy the joint waypoints of the next segment to the position variables.

user (PHO_PICK_OBJECT)

B007 PHO_PICK_FINISH

The MotoPlus binary sets this flag when the last operation of the trajectory is executed. PHO_PICK_OBJECT then ends and resets the flag.

system

B008 PHO_PICKING

The MotoPlus binary sets this flag during the pick procedure. The connection recovery routine checks it.

system

B009 PHO_MESH_DYNAMIC

This flag activates dynamic meshing mode. Set it to TRUE before the first PHO_CAPTURE_REQUEST. Reset it to FALSE immediately after the robot reaches the last meshing waypoint to stop the scanning sequence. Set it to FALSE if you use capture in static mode.

user

B010 PHO_MESH_STARTED

The MotoPlus binary sets this flag to tell INFORM that the first scan of the meshing sequence has arrived. INFORM can then start the predefined capture trajectory.

system

2.6 INTEGER Variables

This version of the BPS module uses these 51 integer variables:

INT variable

Description

Set by

I000 PHO_VC_IP_ADDR_1

First octet of the vision controller IP address

user

I001 PHO_VC_IP_ADDR_2

Second octet of the vision controller IP address

user

I002 PHO_VC_IP_ADDR_3

Third octet of the vision controller IP address

user

I003 PHO_VC_IP_ADDR_4

Fourth octet of the vision controller IP address

user

I004 PHO_REQ_TYPE_ID

Every request INFORM job sets this to tell MotoPlus which request it starts

system

I005 PHO_VS_ID

Vision system ID for the next request

user

I006 PHO_SOL_ID

Solution ID for the next request

user

I007 PHO_ERROR_DATA

Result of the request. See the error table in the API section for possible error codes. Set to 0 if the request was successful.

system

I008 PHO_START_POS_ID

Used by the PHO_INITIALIZE_VS request. Number of the position variable that is sent to BPS as the Start pose of the vision system that is being initialized

user

I009 PHO_END_POS_ID

Used by the PHO_INITIALIZE_VS request. Number of the position variable that is sent to BPS as the End pose of the vision system that is being initialized

user

I010 PHO_TRAJ_SIZE

Used during PHO_PICK_OBJECT to control trajectory execution

system

I011 PHO_NUM_OF_OPER

Used during PHO_PICK_OBJECT to control pick execution

system

I012 PHO_OPER_TYPE_ID

Used during PHO_PICK_OBJECT to control pick execution

system

I013 PHO_GRIP_ACTN_ID

Used during PHO_PICK_OBJECT to control pick execution

system

I014 PHO_ENVI_ID

Environment state for the next request

user

I015 PHO_TRAJ_MOVE_PL

Position level for the whole bin picking trajectory. Value range [0 - 8] 0 means no bending radius and 8 means the maximum bending radius

user

I016 PHO_NUM_OF_LOC

Number of localized objects. Filled by PHO_GET_STATUS_REQUEST (Info data key 12)

system

I017 PHO_NUM_OF_PLAN

Number of pickable objects. Filled by PHO_GET_STATUS_REQUEST (Info data key 13)

system

I018 PHO_VS_CUR_STATE

Current vision system status: 1 = still running, 0 = finished. Filled by PHO_GET_STATUS_REQUEST (Info data key 14)

system

I019 PHO_RESERVED

Reserved for future use

system

I020 PHO_RESERVED

Reserved for future use

system

I021 PHO_TOOL_INV

Tool invariance selected by the system for the current pick (Info data key 1)

system

I022 PHO_GRIP_ID

Gripping point ID selected by the system for the current pick (Info data key 2)

system

I023 PHO_GRIP_INV

Gripping point invariance selected by the system for the current pick (Info data key 3)

system

I024 PHO_DIM_X

X dimension of the object that is being picked, mm (only AI-based solutions, Info data key 4)

system

I025 PHO_DIM_Y

Y dimension of the object that is being picked, mm (only AI-based solutions, Info data key 5)

system

I026 PHO_DIM_ROT_Z

Z rotation of the object that is being picked, in whole degrees. The module converts the received milliradians (only AI-based solutions, Info data key 6)

system

I027 PHO_INFO_DATA_7

Neural network label of the object (AI-based solutions, Info data key 7)

system

I028 PHO_INFO_DATA_8

Max Z height, mm (Info data key 8 - currently sent only by Locator Studio, reserved in BPS)

system

I029 PHO_INFO_DATA_9

Tilt, mrad (Info data key 9 - currently sent only by Locator Studio, reserved in BPS)

system

I030 PHO_INFO_DATA_10

Reserved for future use. Not filled by the current info operations

system

I031 PHO_TOOL_ID

Tool number (0-63) stored with the pose written to P008 (PHO_GET_OBJECT_POSE) and P009 (PHO_CALIB_SAVE). A value out of range raises alarm 8022 and the request fails. PHO_CALIB_SAVE sets it to 0 itself.

user

I032 PHO_USER_COOR_ID

User coordinate number stored with the pose written to P008 and P009. It is counted as on the teach pendant (1-63; 0 is not valid and raises alarm 8023). Set it to 1: the poses are expressed in User Coordinate 1 (chapter 1.7). The module subtracts 1 internally because MotoPlus counts user frames from 0. PHO_CALIB_SAVE sets it to 1 itself.

user

I033 PHO_CALIB_ERROR

Calibration accuracy in micrometers, filled by PHO_CALIB_SAVE (Info data key 10)

system

I034 PHO_RUNNING_SOL

ID of the running solution. Result of the PHO_GET_RUNNING_SOLUTION request (Info data key 11)

system

I035 PHO_CAPTURE_GAP

Delay in milliseconds between scans in dynamic meshing mode

user

I036 PHO_BBOX_ID

Bounding box ID

user

I037 PHO_RESERVED

Reserved for future use

system

I038 PHO_RESERVED

Reserved for future use

system

I039 PHO_RESERVED

Reserved for future use

system

I040 PHO_SPEED_CURR

Joint speed of the segment that is being executed, used as VJ=I040 in PHO_EXE_TRAJ_CNT / PHO_EXE_TRAJ_FINE. Unit 0.01 % (1000 = 10 %). MotoPlus copies it from I041-I050 before each segment.

system

I041 PHO_SPEED_TRAJ_1

Joint speed for trajectory segment 1, unit 0.01 % (1000 = 10 %)

user

I042 PHO_SPEED_TRAJ_2

Joint speed for trajectory segment 2, unit 0.01 % (1000 = 10 %)

user

I043 PHO_SPEED_TRAJ_3

Joint speed for trajectory segment 3, unit 0.01 % (1000 = 10 %)

user

I044 PHO_SPEED_TRAJ_4

Joint speed for trajectory segment 4, unit 0.01 % (1000 = 10 %)

user

I045 PHO_SPEED_TRAJ_5

Joint speed for trajectory segment 5, unit 0.01 % (1000 = 10 %)

user

I046 PHO_SPEED_TRAJ_6

Joint speed for trajectory segment 6, unit 0.01 % (1000 = 10 %)

user

I047 PHO_SPEED_TRAJ_7

Joint speed for trajectory segment 7, unit 0.01 % (1000 = 10 %)

user

I048 PHO_SPEED_TRAJ_8

Joint speed for trajectory segment 8, unit 0.01 % (1000 = 10 %)

user

I049 PHO_SPEED_TRAJ_9

Joint speed for trajectory segment 9, unit 0.01 % (1000 = 10 %)

user

I050 PHO_SPEED_TRAJ_X

Joint speed for trajectory segment 10, unit 0.01 % (1000 = 10 %)

user

2.7 POSITION Variables

Most position variables for bin picking movements use the pulse (joint) representation. Some exceptions, like P008 and P009, keep the default Cartesian representation. The pulse representation is mandatory for the Start and End poses P000 to P007. All trajectory waypoints P010 to P109 are also received as pulse values. Below is an example of the joint representation for P000 - the Start waypoint for VS1.

Note

If you need more than 4 pairs of Start and End poses for vision system initialization, use any free position variable (for example P110 and higher). Put its number into I008 / I009 before PHO_INITIALIZE_VS.

Figure 35

P000 - P007 are reserved for the Start and End poses of vision systems 1-4. Touch up the Start and End poses before the PHO_INITIALIZE_VS request initializes the vision system. At the beginning of each PHO_MAIN example, the templates reference these position variables by the IDs in I008 and I009 (see the image below).

The poses in these P variables are sent to BPS during the PHO_INITIALIZE_VS call. BPS uses them to calculate the bin picking trajectories. The minimum configuration is one Start pose and one End pose. Multiple vision systems can share the same Start and End pose.

Figure 36

P010 - P109 are reserved for the joint waypoints of the trajectory segments. A basic bin picking trajectory has 5 main waypoints (Start, Approach, Grasp, Deapproach, End) and 4 segments that connect them. Each segment can have up to 100 joint waypoints. The MotoPlus binary loads each segment into the position variables just before the segment is executed. So in a basic trajectory, each position variable value can change 4 times during one pick.

This version of the BPS module uses these 110 position variables (P000-P109):

Variable

Representation

Description

Set by

P000

PULSE

Reserved for the VS1 Start pose. Referenced by I008 START POS ID in the PHO_MAIN templates

user

P001

PULSE

Reserved for the VS1 End pose. Referenced by I009 END POS ID in the PHO_MAIN templates

user

…

PULSE

…

…

P006

PULSE

Reserved for the VS4 Start pose. Referenced by I008 START POS ID in the PHO_MAIN templates

user

P007

PULSE

Reserved for the VS4 End pose. Referenced by I009 END POS ID in the PHO_MAIN templates

user

P008

CART

Cartesian pose returned by PHO_GET_OBJECT_POSE. This is the raw localization pose, with the origin from the STL. Gripping points and invariances have no effect on this result. Stored in user coordinate I032 with tool I031.

system

P009

CART

Calibration pose from automatic recalibration, returned by the PHO_CALIB_SAVE request. This pose is useful for checks or for reteaching points, especially in hand-eye applications.

system

P010

PULSE

Joint waypoints of the trajectory segment received from the vision controller

system

…

PULSE

…

system

P109

PULSE

Joint waypoints of the trajectory segment received from the vision controller

system

P110 and higher

PULSE

Not used by the module. You can use them for additional Start and End poses (referenced by I008 / I009).

user

3. Runtime

When the solution is configured, all vision systems are calibrated and all previous steps are done, complete the final steps on the robot side. Then run the bin picking program from the robot.

3.1 Teaching Start and End Poses

Touch up the Start and End poses before you run the main bin picking procedure. The Start and End poses are the first and last waypoints of the bin picking trajectory. They are sent to BPS during the initialization request. In this example, we define the basic P000 and P001 above the center of the bin.

Click Variable → change the type to Position(ROBOT) and select P000.

To touch up the point, press Servo On Ready and jog the robot to the Start position. Then press Modify and Enter to confirm the new pose value. The SLURBT values change.

Figure 37

Repeat the same steps for the End pose P001.

Figure 38

3.2 Gripper Commands

The gripper INFORM jobs are empty by default. Fill them with the correct gripper commands. The Grasping Methods page in BPS defines which command runs in which phase of the picking operation.

For example, if the Attach procedure is defined at the Grasp waypoint as shown below,

Figure 39

fill in the empty PHO_GRIPPER_ATTACH.JBI. When PHO_PICK_OBJECT.JBI calls this job automatically, the gripper must do the correct operation.

Figure 40

We also recommend that you fill in PHO_GRIPPER_DETACH.JBI and call it as the Start waypoint procedure. This makes sure that the gripper is deactivated at the beginning of the picking operation.

Figure 41

3.3 Touching Up Local MOVJ Positions

If you use the PHO_MAIN templates, scroll through the program and find the MOVJ commands (scanning positions). Make sure that the robot is in the correct position during scanning: outside the scanning volume for statically mounted sensors, or above the bin for hand-eye mounted sensors.

Figure 42

3.4 Runtime Prerequisites

Do a final check before you run the bin picking program from the robot side.

Make sure that:

  • The bin picking solution is configured correctly on the vision controller side.

  • The network setup on the robot side is complete and ping works in both directions.

  • All vision systems in the solution are calibrated.

  • The Start and End poses for all vision systems are touched up.

  • All local poses in the main INFORM job that you want to run are touched up correctly.

  • The gripper procedures are ready and work.

3.5 Running the Main INFORM Job

Deploy your solution. If the communication is not established yet, the Action Request Client (robot) status on the Deployment page is DISCONNECTED.

Figure 43

Note

We strongly recommend that you run the program with TEST START first, before you run it in Auto mode.

Use the Select button to go to the program that you want to run, in this case the PHO_MAIN_BASIC.JBI template:

Figure 44

Hold the Interlock and Test Start keys to test start the program. If the connection is established correctly, the Action Request Client and Robot State Server status changes to CONNECTED. The sensor then captures the first scan and localization starts.

Figure 45

If there is a pickable object in the scene and the robot controller has received the trajectory for the first object, the robot starts to move towards the first object. You can check P010 and higher to see if these position variables contain joint data.

Figure 46

If everything looks correct, continue to move the robot towards the first target and check that the path is correct. If the robot stops too far from the object or pushes the object too deep, change the configuration on the Tool Point page in BPS.

If the trajectories look correct, set up your own placing routine. Slowly increase the speed in Manual mode, and then switch to Auto mode.

4. Error Handling

If an error occurs during a request, the error value is stored in the variable I007 PHO_ERROR_DATA (0 = success). All PHO_MAIN templates show basic error handling after PHO_SCAN_REQUEST and PHO_TRAJ_REQUEST. You can add more specific error handling if you need it. Error codes lists the error codes with their descriptions and troubleshooting.

Example of error handling in INFORM after the PHO_TRAJ_REQUEST request:

Figure 47

Communication errors - if sending or receiving fails, the module closes the connection and sets I007 to 3 (communication failure) or 4 (bad data). It also sets B003 so that the waiting job continues, and clears B001 PHO_CONNECTED. To reconnect, call PHO_CONNECT_TO_VC again (it calls PHO_RECOVER first).

4.1 Error Codes

Error codes defined in the module (PhoClient.h). I007 can also hold any other code sent by the vision controller.

Name

I007 value

PHO_OK

0

PHO_SERVICE_ERROR

1

PHO_COMMUNICATION_FAILURE

3

PHO_BAD_DATA

4

PHO_BRAND_ERROR

7

PHO_SIMULATION_ERROR

8

PHO_CALIB_ERR_LO - PHO_CALIB_ERR_HI (calibration errors)

100 - 199

PHO_PATH_PLANNING_FAILED

201

PHO_NO_PART_FOUND

202

PHO_NOT_INITIALIZED

203

PHO_EMPTY_SCENE

218

PHO_UNKNOW_STATE

219

PHO_SCENE_NOT_AVAILABLE

220

PHO_SCENE_ACTIVE

221

PHO_BBOX_ID_INVALID (invalid bounding box)

222

PHO_WRONG_BP_CONFIG

255

4.2 Controller Alarms

The MotoPlus module raises these user alarms on the controller:

Alarm

Meaning

8000

Unknown request ID in I004

8001

Incorrect vision controller IP address in I000-I003

8002

Cannot create a socket

8003

Cannot connect to the vision controller (port 11003)

8004

Cannot send the brand ID to the vision controller

8005 / 8006

Cannot read the Start / End pose (P variable in I008 / I009)

8011

The response does not belong to the sent request (request ID mismatch)

8013 / 8015

Unexpected or unknown operation type in the response

8014

Cannot receive or store the object pose or calibration pose

8016

The operation does not match the request

8017

Corrupted trajectory data (checksum)

8018 / 8019

Trajectory / gripper / operation buffer overflow

8020

Cannot write a trajectory waypoint to a P variable during PHO_PICK_OBJECT

8021

Cannot read or write a variable (B, I or P)

8022

Tool ID in I031 is outside 0-63

8023

User frame ID in I032 is outside 1-63

8024

Cannot read a flag while waiting

8025

The received pose is not valid (out of range) and was not written

8030 - 8033

Robot State Server: cannot create, bind or listen on the socket, or cannot send the brand ID

8034

Robot State Server: cannot read the joint positions

8035 / 8036

Cannot read the TCP position (User Coordinate 1 is not defined)

8037

Robot State Server is disabled after one of the errors above

5. Info Data

Info data are extra values that the vision controller sends with a response (see Info data). The module writes each value into an integer variable:

Info data key

Variable

Unit in robot

1 Tool point invariance

I021

index

2 Gripping point ID

I022

index

3 Gripping point invariance

I023

index

4 Dimension X

I024

mm

5 Dimension Y

I025

mm

6 Rotation Z

I026

whole degrees (converted from mrad)

7 Neural network label

I027

integer

8 Max Z height

I028

mm

9 Tilt

I029

mrad

10 Calibration accuracy

I033

µm

11 Running solution ID

I034

integer

12 Number of localized objects

I016

integer

13 Number of ready objects

I017

integer

14 Processing state

I018

0 / 1

Keys 1-6 come with the trajectory response (PHO_TRAJ_RECEIVE) or the object pose response (PHO_GET_OBJECT_POSE). Key 10 comes with PHO_CALIB_SAVE, key 11 with PHO_GET_RUNNING_SOLUTION, and keys 12-14 with PHO_GET_STATUS_REQUEST.

6. Version and Brand ID

Item

Value

Robot module version

1.12.1

Brand ID sent to the vision controller

YASKAWA/1.12.0_XXXXXXXXX

Action Request port (the robot connects to the vision controller)

11003

Robot State Server port (the vision controller connects to the robot)

11004

The brand ID stays at 1.12.0 in module version 1.12.1 because the communication protocol did not change.

7. Migration

See Migration from BPS 1.11.x to BPS 1.12.x for the changes between Robot module versions.

To upgrade from 1.12.0 to 1.12.1, load the new PhotoneoModule_BPS_1.12.1.out and the updated PHO_CALIB_SAVE.JBI. PHO_CALIB_SAVE now sets I031 and I032 itself. I032 must be 1-63 (not 0).